1. Field of the Invention
The present invention relates to a coding apparatus for encoding digital image data and, more particularly, to a coding apparatus which can encode image data representing gray levels with high efficiency.
2. Related Background Art
In an image transmission apparatus such as a facsimile system, or an image memory apparatus such as an electronic filing system, coding processing for compressing image data is performed in order to improve transmission and storage efficiencies. In such coding processing, the Modified Huffman (MH) coding method, the Modified Read (MR) coding method, or the like is normally used. These coding methods are mostly used for white/black binary image data, and a coding operation with high compression efficiency can be performed with respect to binary data including no halftone data, such as a document.
However, when a coding method for the white/black binary image data is used for encoding image data representing a halftone image, e.g., a photograph, a coding operation with high compression efficiency cannot often be made. In some cases, the data volume after encoding often exceeds the original data volume.
Therefore, in order to achieve a high compression ratio, the data volume to be encoded may be decreased at the cost of halftone reproducibility. However, with this method, a distortion occurs between a reproduced image and an original image, and this method is not preferable.
Various other high-efficiency methods have been proposed for digital image data with gradation on the basis of an idea quite different from the conventional coding methods for white/black binary data. In some of these methods, an input image is divided into N.times.M blocks, and a coding operation is performed for each block. In one of such methods, an average value (DC component) of pixel levels in each block is calculated, differences (AC components) from the average value are extracted, and the differences are encoded. However, with this method, a high compression ratio cannot be obtained. When the compression ratio is to be improved, reproduced image quality may be degraded. Therefore, this method is not suitable for an image with gradation.